#pragma once
#include "device/Vector_dev.hpp"
#include "Material.hpp"
#include "UnifiedMemManaged.hpp"

class Object;

struct Intersection : public UnifiedMemManaged
{
    __device__ Intersection()
    {
        happened = false;
        coords = Vector3fDev();
        normal = Vector3fDev();
        distance = 1024000.0;
        obj = nullptr;
        m = nullptr;
    }
    bool happened;
    Vector3fDev coords;
    Vector3fDev tcoords;
    Vector3fDev normal;
    Vector3fDev emit;
    double distance;
    Object *obj;
    Material *m;
};